<?php
/**
 * User: lsx
 * Date: 2017/4/24
 * Time: 16:40
 * Progress:0%
 */

namespace app\wechat\controller;


use icontroller\admin\AController;
use logic\admin\wechat\LWecatBaseReply;

class WechatBaseReply extends AController
{
    private $logic;
    function __construct()
    {
        parent::__construct();
        $this->logic=new LWecatBaseReply();
    }

    public function index(){
        return view();
    }

    public function index_data(){
        $params=array(
            'keyword'=>input('keyword'),
            'limit'=>input('limit'),
            'offset'=>input('offset'),
            'sort'=>input('sort'),
            'order'=>input('order'),
        );
        return $this->logic->logic_index_data($params);
    }

    public function edit_data(){
        $id=input('id');
        $item=$this->logic->logic_edit_data($id);
        $this->assign('item',$item);
        return view();
    }

    public function update_data(){
        $id=input('id');
        $params=array(
            'title'=>input('title'),
            'status'=>input('status'),
            'content'=>input('content')
        );
        return $this->logic->logic_update_data($id,$params);
    }

}